[API] integrate-service
fpt.js
Push Brandname OTP
- Route:
/push-brandname-otp - Method: POST
- Body:
session_id, brand, phone, message - Related API:
- client:
POST /push-brandname-otp
- client:
- Return Format:
- Success: 200
res.json(resp.data) - Failure: 400
{ success: false, error: { message: error } }
- Success: 200
hubspot.js
Hubspot API
- Route:
/me - Header:
x-hapikey - Method: GET
- Related API:
- hubspot:
GET /integrations/v1/me
- hubspot:
- Return Format:
- Success: 200
res.json(response.data) - Failure: 400
{ success: false, error: error.response.data }
- Success: 200
Create Contact
- Route:
/contact - Method: POST
- Header:
x-hapikey, x-haccesstoken - Body:
firstname, lastname, email, phone, company, website, address, city, state, zip - Related API:
- hubspot:
POST /contacts/v1/contact
- hubspot:
- Return Format:
- Success: 200
{ success: true, result: response.data }) - Failure: 400
{ success: false, error: error.response.data }
- Success: 200
Search Contact
- Route:
/contacts/search - Method: GET
- Header:
x-hapikey, x-haccesstoken - Query:
q - Related API:
- hubspot:
GET /contacts/v1/search/query
- hubspot:
- Return Format:
- Success: 200
res.json(response.data) - Failure: 400
{ success: false, error: error.response.data }
- Success: 200
Create Engagement
- Route:
/engagement - Header:
x-hapikey, x-haccesstoken - Method: POST
- Body:
req.body - Related API:
- hubspot:
POST /engagements/v1/engagements
- hubspot:
- Return Format:
- Success: 200
{ success: true, result: response.data } - Failure: 400
{ success: false, error: error.response.data }
- Success: 200
Get Engagement
- Route:
/engagement/:id - Header:
x-hapikey, x-haccesstoken - Method: GET
- Related API:
- hubspot:
GET /engagements/v1/engagements/:id
- hubspot:
- Return Format:
- Success: 200
{ success: true, result: response.data } - Failure: 400
{ success: false, error: error.response.data }
- Success: 200
Update Engagement
- Route:
/engagement/:id - Header:
x-hapikey, x-haccesstoken - Method: PUT
- Related API:
- hubspot:
PATCH /engagements/v1/engagements/:id
- hubspot:
- Return Format:
- Success: 200
{ success: true, result: response.data } - Failure: 400
{ success: false, error: error.response.data }
- Success: 200
Delete Engagement
- Route:
/engagement/:id - Header:
x-hapikey, x-haccesstoken - Method: DELETE
- Related API:
- hubspot:
DELETE /engagements/v1/engagements/:id
- hubspot:
- Return Format:
- Success: 200
{ success: true, result: response.data } - Failure: 400
{ success: false, error: error.response.data }
- Success: 200
Get Engagements Associated with Contact
- Route:
/engagements/associated/contact - Header:
x-hapikey, x-haccesstoken - Method: GET
- Query:
vid - Related API:
- hubspot:
GET /engagements/v1/engagements/associated/CONTACT/:vid
- hubspot:
- Return Format:
- Success: 200
{ success: true, result } - Failure: 400
{ success: false, error: error.response.data }
- Success: 200
Search Tickets
- Route:
/tickets/search - Header:
x-hapikey, x-haccesstoken - Method: GET
- Query:
id - Related API:
- hubspot:
POST https://api.hubapi.com/crm/v3/objects/tickets/search - hubspot:
POST https://api.hubapi.com/crm/v3/owners/${hubspot_owner_id}
- hubspot:
- Return Format:
- Success: 200
{ success: true, result } - Failure: 400
{ success: false, error: error.response.data }
- Success: 200
Create Ticket
- Route:
/ticket - Header:
x-hapikey, x-haccesstoken - Method: POST
- Body:
subject, content, source_type, hubspot_owner_id, toObjectId - Related API:
- hubspot:
POST /crm-objects/v1/objects/tickets - hubspot:
PUT /crm-associations/v1/associations
- hubspot:
- Return Format:
- Success: 200
{ success: true, result: response.data } - Failure: 400
{ success: false, error: error.response.data }
- Success: 200
Create Association
- Route:
/association - Header:
x-hapikey, x-haccesstoken - Method: POST
- Body:
fromObjectId, toObjectId, definitionId - Related API:
- hubspot:
PUT /crm-associations/v1/associations
- hubspot:
- Return Format:
- Success: 200
res.json({ success: true }) - Failure: 400
{ success: false, error: error.response.data }
- Success: 200
Get Associations
- Route:
/associations - Header:
x-hapikey, x-haccesstoken - Method: GET
- Query:
objectId, definitionId - Related API:
- hubspot:
GET /crm-associations/v1/associations/:objectId/HUBSPOT_DEFINED/:definitionId
- hubspot:
- Return Format:
- Success: 200
{ success: true, result: response.data } - Failure: 400
{ success: false, error: error.response.data }
- Success: 200
Get Recent Deals
- Route:
/deals/recent - Method: GET
- Header:
x-hapikey, x-haccesstoken - Query:
objectId - Related API:
- hubspot:
GET /crm-associations/v1/associations/:objectId/HUBSPOT_DEFINED/4 - hubspot:
GET /deals/v1/deal/:offset
- hubspot:
- Return Format:
- Success: 200
res.json({ success: true, result: { deal, count } }) - Failure: 400
{ success: false, error: error.response.data }
- Success: 200
integrator.js
Post Endpoint
- Route:
/:endpoint_name - Method: POST
- Params:
endpoint_name - Body:
req.body - Related API:
- Client:
GET /integration/endpoint/name/${endpoint_name} - Access:
/integrators/?filter={"idCallcenter":"${body.idCallcenter}","idTemplate":"${api.idTemplate}"}
- Client:
- Return Format:
- Success: 200
res.status(response.status).json(response.data) - Failure: 500
{ success: false, error: { message: error.message } }
- Success: 200
Post Endpoint in Template
- Route:
/:template_name/endpoint/:endpoint_name - Method: POST
- Params:
template_name, endpoint_name - Body:
req.body - Query:
versionSchema - Related API: [Not specified]
- Return Format:
- Success: 200
res.json(result) - Failure: 500
{ success: false, error: { message: error.message } }
- Success: 200
Check log integration
- Route:
/:idCallcenter/checklog - Method: GET
- Params:
idCallcenter - Query:
versionSchema, data - Related API:
- client:
GET /integration/checklog/${idCallcenter}
- client:
- Return Format:
- Success: 200
res.json(result) - Failure: 500
{ success: false, error: { message: error.message } }
- Success: 200
Restore log integration
- Route:
/:idCallcenter/restorelog - Method: POST
- Params:
idCallcenter - Body:
templateName - Query:
versionSchema - Related API:
- client:
POST /integration/restorelog/${idCallcenter}
- client:
- Return Format:
- Success: 200
res.json(response.data) - Failure: 500
{ success: false, error: { message: error.message } }
- Success: 200
mio.js
Get Investor By Phone
- Route:
/get-investor-by-phone - Method: GET
- Query:
cell_phone - Headers:
x-mio-clientid,x-mio-securesecret - Related API:
- mio:
GET /api-get-investor-by-phone
- mio:
- Return Format:
- Success: 200
res.status(response.status).json(response.data) - Failure: 400
{ success: false, error: { message: error } }
- Success: 200
nexmo.js
Send SMS
- Route:
/sms - Method: GET
- Query:
phone, sms, apikey, apisecret, brand - Related API:
- Vonage:
vonage.message.sendSms
- Vonage:
- Return Format:
- Success: 200
res.status(200).json(responseData.messages[0]['status']) - Failure: 400
res.json(responseData.messages[0]['status'])
- Success: 200
Inbound SMS
- Route:
/inbound-sms - Method: GET
- Query:
text, msisdn, to, api-key, idCallcenter - Related API:
- Access:
GET /nexmos - Access:
GET /callcenter/${idCallcenter}/phone - Access:
POST /callcenter/${idCallcenter}/contact - Access:
GET /callcenter/${idCallcenter}/contact/${idContact}/activities - Access:
GET /user/search - Access:
POST /callcenter/${idCallcenter}/contact/${idContact}/activity
- Access:
- Return Format:
- Success: 200
res.status(200).json(response.data) - Failure: 500
{ success: false, error: { message: error.message } }
- Success: 200
nhanh.js
Search Customer
- Route:
/customer/search - Method: GET
- Query:
mobile - Headers:
x-apiusername,x-secretkey - Related API:
- nhanh:
GET /api/customer/search
- nhanh:
- Return Format:
- Success: 200
res.json(response.data) - Failure: 500
{ success: false, error: { message: error.message } }
- Success: 200
sapo.js
Get Customers
- Route:
/customers - Method: GET
- Query:
page, per_page, keyword, status - Headers:
x-sapo-access-token,x-sapo-tenant - Related API:
- Sapo:
GET https://${tenant}.mysapogo.com/admin/customers.json
- Sapo:
- Return Format:
- Success: 200
res.json(response.data) - Failure: 500
{ success: false, error: { message: error.message } }
- Success: 200
Add Note
- Route:
/customers/note - Method: POST
- Body:
customerId, accountId, content - Headers:
x-sapo-access-token,x-sapo-tenant - Related API:
- Sapo:
POST https://${tenant}.mysapogo.com/admin/customers/${customerId}/notes.json
- Sapo:
- Return Format:
- Success: 200
res.json(response.data) - Failure: 500
{ success: false, error: { message: error.message } }
- Success: 200
Get Accounts
- Route:
/accounts - Method: GET
- Query:
req.query - Headers:
x-sapo-access-token,x-sapo-tenant - Related API:
- Sapo:
GET https://${tenant}.mysapogo.com/admin/accounts.json
- Sapo:
- Return Format:
- Success: 200
res.json(response.data) - Failure: 500
{ success: false, error: { message: error.message } }
- Success: 200
Get Account
- Route:
/accounts/:id - Method: GET
- Params:
id - Headers:
x-sapo-access-token,x-sapo-tenant - Related API:
- Sapo:
https://${tenant}.mysapogo.com/admin/accounts/${req.params.id}.json
- Sapo:
- Return Format:
- Success: 200
res.json(response.data) - Failure: 500
{ success: false, error: { message: error.message } }
- Success: 200
Get Orders
- Route:
/orders - Method: GET
- Query:
req.query - Headers:
x-sapo-access-token,x-sapo-tenant - Related API:
- Sapo:
GET https://${tenant}.mysapogo.com/admin/orders.json
- Sapo:
- Return Format:
- Success: 200
res.json(response.data) - Failure: 500
{ success: false, error: { message: error.message } }
- Success: 200
trigger.js
Calllog
- Route:
/calllogd - Method: POST
- Body:
idCallcenter, data - Related API:
- Access:
GET /callcenter/${idCallcenter}/integrator - Access:
GET /integration/endpoints/?filter=${JSON.stringify(filter)}
- Access:
- Return Format:
- Success: 200
{success: true} - Failure: 500
{ success: false, error: { message: error.message } }
- Success: 200
vietguy.js
Send SMS
Route:
/smsMethod: GET
Query:
phone, smsRelated API:
client:
GET /api/Return Format:
Success: 200
res.json(response.data)Failure: 500
{ success: false, error: { message: error.message } }